/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * AddAluno.java
 *
 * Created on 15/07/2011, 08:58:46
 */

package controlenotas;

import java.awt.Frame;
import java.util.ArrayList;
import javax.swing.JOptionPane;
import negocio.Aluno;
import negocio.Turma;

/**
 *
 * @author jeferson
 */
public class Cabecalho extends javax.swing.JDialog {

    private Frame parent = null;

    /** Creates new form AddAluno */
    public Cabecalho(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
        this.setLocationRelativeTo(parent);
        this.parent = parent;
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jXPanel2 = new org.jdesktop.swingx.JXPanel();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        jXPanel1 = new org.jdesktop.swingx.JXPanel();
        jSeparator1 = new javax.swing.JSeparator();
        jXPanel3 = new org.jdesktop.swingx.JXPanel();
        jXPanel4 = new org.jdesktop.swingx.JXPanel();
        jTextField2 = new javax.swing.JTextField();
        jXPanel6 = new org.jdesktop.swingx.JXPanel();
        jTextField3 = new javax.swing.JTextField();
        jXPanel5 = new org.jdesktop.swingx.JXPanel();
        jTextField1 = new javax.swing.JTextField();
        jSeparator2 = new javax.swing.JSeparator();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Adicionar Alunos");
        setIconImage(null);
        setLocationByPlatform(true);
        setResizable(false);

        jLabel1.setBackground(java.awt.Color.white);
        jLabel1.setOpaque(true);
        jLabel1.setFont(new java.awt.Font("Ubuntu", 1, 24)); // NOI18N
        jLabel1.setForeground(java.awt.SystemColor.activeCaption);
        jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/alunos.png"))); // NOI18N
        jLabel1.setText("Dados do Cabeçalho");
        jLabel1.setOpaque(true);
        jLabel1.setPreferredSize(new java.awt.Dimension(248, 80));
        getContentPane().add(jLabel1, java.awt.BorderLayout.PAGE_START);

        jXPanel2.setPreferredSize(new java.awt.Dimension(400, 60));
        jXPanel2.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jButton1.setText("Ok");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });
        jXPanel2.add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 20, 80, -1));

        jButton2.setText("Cancelar");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });
        jXPanel2.add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(310, 20, -1, -1));

        getContentPane().add(jXPanel2, java.awt.BorderLayout.PAGE_END);

        jXPanel1.setLayout(new java.awt.BorderLayout());
        jXPanel1.add(jSeparator1, java.awt.BorderLayout.NORTH);

        jXPanel3.setLayout(new javax.swing.BoxLayout(jXPanel3, javax.swing.BoxLayout.PAGE_AXIS));

        jXPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Escola", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Dialog", 0, 12), java.awt.SystemColor.activeCaption)); // NOI18N
        jXPanel4.setLayout(new java.awt.BorderLayout());

        jTextField2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextField2ActionPerformed(evt);
            }
        });
        jXPanel4.add(jTextField2, java.awt.BorderLayout.CENTER);

        jXPanel3.add(jXPanel4);

        jXPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Professor", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Dialog", 0, 12), java.awt.SystemColor.activeCaption)); // NOI18N
        jXPanel6.setLayout(new java.awt.BorderLayout());

        jTextField3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextField3ActionPerformed(evt);
            }
        });
        jXPanel6.add(jTextField3, java.awt.BorderLayout.CENTER);

        jXPanel3.add(jXPanel6);

        jXPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Motivo", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Dialog", 0, 12), java.awt.SystemColor.activeCaption)); // NOI18N
        jXPanel5.setLayout(new java.awt.BorderLayout());

        jTextField1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextField1ActionPerformed(evt);
            }
        });
        jXPanel5.add(jTextField1, java.awt.BorderLayout.CENTER);

        jXPanel3.add(jXPanel5);

        jXPanel1.add(jXPanel3, java.awt.BorderLayout.CENTER);
        jXPanel1.add(jSeparator2, java.awt.BorderLayout.SOUTH);

        getContentPane().add(jXPanel1, java.awt.BorderLayout.CENTER);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        this.dispose();
    }//GEN-LAST:event_jButton2ActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        //((MainWindow)parent).gerarListaDePresenca(jTextField2.getText(), jTextField3.getText(), jTextField1.getText());
        this.dispose();
    }//GEN-LAST:event_jButton1ActionPerformed

    private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField1ActionPerformed
        this.jButton1ActionPerformed(evt);
    }//GEN-LAST:event_jTextField1ActionPerformed

    private void jTextField2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField2ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jTextField2ActionPerformed

    private void jTextField3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField3ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jTextField3ActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JTextField jTextField2;
    private javax.swing.JTextField jTextField3;
    private org.jdesktop.swingx.JXPanel jXPanel1;
    private org.jdesktop.swingx.JXPanel jXPanel2;
    private org.jdesktop.swingx.JXPanel jXPanel3;
    private org.jdesktop.swingx.JXPanel jXPanel4;
    private org.jdesktop.swingx.JXPanel jXPanel5;
    private org.jdesktop.swingx.JXPanel jXPanel6;
    // End of variables declaration//GEN-END:variables

}
